import request from '@/utils/request'

// 查询时间片列表
export function listSlices(query) {
  return request({
    url: '/doctor/slices/list',
    method: 'get',
    params: query
  })
}
export function listByDetails(query) {
  return request({
    url: '/doctor/slices/listByDetails',
    method: 'get',
    params: query
  })
}
export function listByDetailsByUserId(query) {
  return request({
    url: '/doctor/slices/listByDetailsByUserId',
    method: 'get',
    params: query
  })
}

export function listByFreeTimeId(id) {
  return request({
    url: '/doctor/slices/listByFreeTimeId/'+id,
    method: 'get'
  })
}


// 查询时间片详细
export function getSlices(id) {
  return request({
    url: '/doctor/slices/' + id,
    method: 'get'
  })
}

// 新增时间片
export function addSlices(data) {
  return request({
    url: '/doctor/slices',
    method: 'post',
    data: data
  })
}

// 修改时间片
export function updateSlices(data) {
  return request({
    url: '/doctor/slices',
    method: 'put',
    data: data
  })
}

// 删除时间片
export function delSlices(id) {
  return request({
    url: '/doctor/slices/' + id,
    method: 'delete'
  })
}
